package com.sumu.adapter;

import java.util.List;

import com.android.volley.toolbox.NetworkImageView;

import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;

public class AdvPagerAdapter extends PagerAdapter {
	private List<NetworkImageView> imageViews;
	
	//啧啧啧啧啧啧啧啧啧水水水水谁谁谁水水水水水水水水水水水水
	public AdvPagerAdapter(List<NetworkImageView> imageViews) {
		super();
		this.imageViews = imageViews;
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return imageViews.size();
	}
	@Override
	public Object instantiateItem(ViewGroup container, int position) {
		// TODO Auto-generated method stub
		container.addView(imageViews.get(position));
		return imageViews.get(position);
	}
	@Override
	public void destroyItem(ViewGroup container, int position, Object object) {
		container.removeView(imageViews.get(position));
	}

	@Override
	public boolean isViewFromObject(View arg0, Object arg1) {
		// TODO Auto-generated method stub
		return arg0 == arg1;
	}

}
